package co.com.colombiamovil.imeiservice.util;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class DatabaseUtil {
  
  public static void closePreparedStatement(PreparedStatement ps){
    if (ps != null) {
      try {
        ps.close();
      } catch (Exception e1) {
      }
    }
    ps = null;
  }
  
  public static void closeResultSet(ResultSet rs){
    if (rs != null) {
      try {
        rs.close();
      } catch (Exception e1) {
      }
    }
    rs = null;
  }
  
  public static void closeCallableStatement(CallableStatement cs){
    if (cs != null) {
      try {
        cs.close();
      } catch (Exception e1) {
      }
    }
    cs = null;
  }
  
  public static void closeConnection(Connection con){
    if (con != null) {
      try {
        con.close();
      } catch (Exception e1) {
      }
    }
    con = null;
  }
  
}
